﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{
    internal class CachedDiskHeader
    {
        private DXFN12List rgHdrDisk;
        private XLUnicodeString strStyleName;

        public CachedDiskHeader(BinaryReader reader)
        {
            var cbdxfHdrDisk = reader.ReadUInt32();
            this.rgHdrDisk = new DXFN12List(reader, (int) cbdxfHdrDisk);
            this.strStyleName = new XLUnicodeString();
            strStyleName.Read(reader);
        }

        public void Write(BinaryWriter writer)
        {
            DeferredIntWriter w = new DeferredIntWriter(writer);
            using (w.GetLength())
            {
                this.rgHdrDisk.Write(writer);
            }
            this.strStyleName.Write(writer);
            throw new NotImplementedException();
        }
    }
}